#ifndef _ROOM_SCENE_
#define _ROOM_SCENE_

#include "aerial\Scene\Scene.h"

#include "raknet\RakString.h"

namespace air {
	class Text;
	class TextInput;
	class Button;
	class DisplayBoard;
	class Panel;
	class IGuiObject;
};

using namespace air;
using namespace RakNet;

/**
 * @brief Scene when the game just started
 */
class RoomScene: public IScene
{
public:
	RoomScene(const char* _userName);
	bool initialize();
	void Enter();
	void Leave();

	/// @brief start a new game
	void Start();
	/// @brief messagebox when button pressed
	void Back();
	/// @brief EnterReadyState
	void Ready();

	bool update(float dt);
	bool render(float dt);
	void DeSerialization(BitStream* bsi);
	void ChangeType();
	void ChangeSide1();
	void ChangeSide2();
	bool ChangePlayerSide(uchar id, bool side);

	void EnterBattle();
	void SetUserName(char* _userName) { userName = _userName; }
private:
	float frameWidth, frameHeight;
	float flashWidth, flashHeight;
	bool gameStart, entered;

	// objects lying in the scene
	DisplayBoard* boards[MAX_PLAYER_COUNT];
	Panel *mainPanel, *menu;
	Button *ready, *start, *back;
	Text *sideLabel1, *sideLabel2;
	RakString userName;
};

#endif
